home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / System / VersCheckGUI / src / main.h < prev    next >
C/C++ Source or Header  |  1999-10-19  |  6KB  |  288 lines

  1. /* VersCheck GUI includes */
  2. #include "version.h"
  3.  
  4. #include <clib/alib_protos.h>
  5. #include <clib/asl_protos.h>
  6. #include <clib/battclock_protos.h>
  7. #include <clib/battmem_protos.h>
  8. #include <clib/cia_protos.h>
  9. #include <clib/commodities_protos.h>
  10. #include <clib/console_protos.h>
  11. #include <clib/diskfont_protos.h>
  12. #include <clib/dos_protos.h>
  13. #include <clib/exec_protos.h>
  14. #include <clib/expansion_protos.h>
  15. #include <clib/gadtools_protos.h>
  16. #include <clib/graphics_protos.h>
  17. #include <clib/icon_protos.h>
  18. #include <clib/iffparse_protos.h>
  19. #include <clib/input_protos.h>
  20. #include <clib/intuition_protos.h>
  21. #include <clib/keymap_protos.h>
  22. #include <clib/layers_protos.h>
  23. #include <clib/macros.h>
  24. #include <clib/mathffp_protos.h>
  25. #include <clib/mathieeedoubbas_protos.h>
  26. #include <clib/mathieeedoubtrans_protos.h>
  27. #include <clib/mathieeesingbas_protos.h>
  28. #include <clib/mathieeesingtrans_protos.h>
  29. #include <clib/mathtrans_protos.h>
  30. #include <clib/misc_protos.h>
  31. #include <clib/potgo_protos.h>
  32. #include <clib/ramdrive_protos.h>
  33. #include <clib/timer_protos.h>
  34. #include <clib/translator_protos.h>
  35. #include <clib/utility_protos.h>
  36. #include <clib/wb_protos.h>
  37. #include <stdio.h>
  38. #include <string.h>
  39. #include <stdlib.h>
  40. #include <time.h>
  41. #include <stat.h>
  42. #include <signal.h>
  43. #include <libraries/dos.h>
  44. #include <libraries/dosextens.h>
  45. #include <libraries/diskfont.h>
  46. #include <libraries/intuisup.h>
  47. #include <intuition/intuition.h>
  48. #include <dos/dos.h>
  49. #include <dos/dosextens.h>
  50. #include <dos/datetime.h>
  51. #include <exec/types.h>
  52. #include <exec/io.h>
  53. #include <exec/exec.h>
  54. #include <exec/execbase.h>
  55. #include <exec/ports.h>
  56. #include <exec/tasks.h>
  57. #include <exec/memory.h>
  58. #include <devices/console.h>
  59. #include <devices/conunit.h>
  60. #include <devices/serial.h>
  61. #include <devices/narrator.h>
  62. #include <devices/timer.h>
  63. #include <graphics/text.h>
  64.  
  65. #include "VersCheckGUI_protos.h"
  66. #include "VERS.h"
  67.  
  68. #define RENDER_INFO_FLAGS  1
  69. #define OPEN_WINDOW_FLAGS  0
  70.  
  71. #define WINDOW_LEFT_EDGE   0
  72. #define WINDOW_TOP_EDGE    0
  73. #define WINDOW_WIDTH       435
  74. #define WINDOW_HEIGHT      230
  75.  
  76. STATIC struct NewWindow  verscheck_new_window =
  77. {
  78.     WINDOW_LEFT_EDGE, WINDOW_TOP_EDGE, WINDOW_WIDTH, WINDOW_HEIGHT,
  79.     1, 2,
  80.     CLOSEWINDOW | MENUPICK | GADGET_IDCMP_FLAGS_ALL,
  81.     WINDOWCLOSE | WINDOWDRAG | WINDOWDEPTH | RMBTRAP,
  82.  
  83.     NULL, NULL,
  84.     (UBYTE *)"VersCheck GUI",
  85.     NULL, NULL,
  86.     -1, -1, -1, -1,
  87.     WBENCHSCREEN
  88. };
  89.  
  90. #define VERSCHECK_BORDER_FLAGS   0
  91.  
  92. STATIC struct BorderData  verscheck_border_data[] =
  93. {
  94.     {
  95.         2, 144, 16, 182, 127
  96.     },
  97.     {
  98.         INTUISUP_DATA_END
  99.     }
  100. };
  101.  
  102. STATIC struct TextAttr  verscheck_text_attr[] =
  103. {
  104.     {
  105.         (STRPTR)"xen.font", 9, FS_NORMAL, FPF_ROMFONT
  106.     }
  107. };
  108.  
  109. #define VERSCHECK_GADGET_LIBCHECK    0
  110. #define VERSCHECK_GADGET_ALL        1
  111. #define VERSCHECK_GADGET_SYSINFO    2
  112. #define VERSCHECK_GADGET_FULLPATH    3
  113. #define VERSCHECK_GADGET_MERGE        4
  114. #define VERSCHECK_GADGET_NOREQ        5
  115. #define VERSCHECK_GADGET_HTML        6
  116. #define VERSCHECK_GADGET_VERBOSE    7
  117. #define VERSCHECK_GADGET_POWEREXE    8
  118. #define VERSCHECK_GADGET_IMAGES        9
  119. #define VERSCHECK_GADGET_SUFFIX        10
  120. #define VERSCHECK_GADGET_LIST        11
  121. #define VERSCHECK_GADGET_OUTFILE    12
  122. #define VERSCHECK_GADGET_FILEDIR    13
  123. #define VERSCHECK_GADGET_START        14
  124. #define VERSCHECK_GADGET_STARTALL    15
  125.  
  126. STATIC BYTE *verscheck_gadget1_text_array[] =
  127. {
  128.     "Library's",
  129.     "Devices",
  130.     "Datatypes",
  131.     "MUI",
  132.     "Handler",
  133.     "Classes .class",
  134.     "Classes .image",
  135.     "Classes .gadget",
  136.     "Classes .codec",
  137.     "Classes .decoder",
  138.     "Free config",
  139.     "None",
  140.     NULL
  141. };
  142.  
  143. STATIC BYTE *verscheck_powerexe_text_array[] =
  144. {
  145.     "No PPC",
  146.     "PowerUP",
  147.     "WarpOS",
  148.     "PPC + WOS",
  149.     NULL
  150. };
  151.  
  152. STATIC BYTE *verscheck_images_text_array[] =
  153. {
  154.     "No images",
  155.     "IFF",
  156.     "Images",
  157.     NULL
  158. };
  159.  
  160. STATIC struct GadgetData  verscheck_gadget_data[] =
  161. {
  162.     {
  163.         3, 144, 3, 16, 138, 127,
  164.         "_compare with", &verscheck_text_attr[0],
  165.         {
  166.             1, 0, &verscheck_gadget1_text_array[0]
  167.         }
  168.     },
  169.     {
  170.         2, 144, 150, 27, 21, 11,
  171.         "_all subdirs", &verscheck_text_attr[0],
  172.         {
  173.             1, 0, (VOID *)0
  174.         }
  175.     },
  176.     {
  177.         2, 144, 150, 43, 21, 11,
  178.         "_show systeminformation", &verscheck_text_attr[0],
  179.         {
  180.             1, 0, (VOID *)0
  181.         }
  182.     },
  183.     {
  184.         2, 144, 150, 59, 21, 11,
  185.         "_full path", &verscheck_text_attr[0],
  186.         {
  187.             1, 0, (VOID *)0
  188.         }
  189.     },
  190.     {
  191.         2, 144, 150, 75, 21, 11,
  192.         "_merge outputfiles", &verscheck_text_attr[0],
  193.         {
  194.             0, 0, (VOID *)0
  195.         }
  196.     },
  197.     {
  198.         2, 144, 150, 91, 21, 11,
  199.         "_no requester", &verscheck_text_attr[0],
  200.         {
  201.             0, 0, (VOID *)0
  202.         }
  203.     },
  204.     {
  205.         2, 144, 150, 107, 21, 11,
  206.         "force _HTML output", &verscheck_text_attr[0],
  207.         {
  208.             1, 0, (VOID *)0
  209.         }
  210.     },
  211.     {
  212.         2, 144, 150, 123, 21, 11,
  213.         "_verbose", &verscheck_text_attr[0],
  214.         {
  215.             1, 0, (VOID *)0
  216.         }
  217.     },
  218.     {
  219.         3, 144, 331, 16, 96, 47,
  220.         "ch_eck", &verscheck_text_attr[0],
  221.         {
  222.             1, 3, &verscheck_powerexe_text_array[0]
  223.         }
  224.     },
  225.     {
  226.         3, 144, 331, 106, 96, 37,
  227.         "_list", &verscheck_text_attr[0],
  228.         {
  229.             1, 0, &verscheck_images_text_array[0]
  230.         }
  231.     },
  232.     {
  233.         4, 80, 200, 147, 227, 20,
  234.         "Suffi_x", &verscheck_text_attr[0],
  235.         {
  236.             30, 0, ""
  237.         }
  238.     },
  239.     {
  240.         4, 80, 200, 167, 227, 18,
  241.         "C_ompare list", &verscheck_text_attr[0],
  242.         {
  243.             120, 0, ""
  244.         }
  245.     },
  246.     {
  247.         4, 80, 200, 187, 227, 18,
  248.         "Out_put file", &verscheck_text_attr[0],
  249.         {
  250.             120, 0, ""
  251.         }
  252.     },
  253.     {
  254.         4, 80, 200, 207, 227, 18,
  255.         "file/_dir", &verscheck_text_attr[0],
  256.         {
  257.             120, 0, ""
  258.         }
  259.     },
  260.     {
  261.         1, 1040, 4, 150, 111, 25,
  262.         "S_tart VersCheck", &verscheck_text_attr[0],
  263.         {
  264.             0, 0, (VOID *)0
  265.         }
  266.     },
  267.     {
  268.         1, 1040, 4, 180, 111, 25,
  269.         "Sta_rt all tests", &verscheck_text_attr[0],
  270.         {
  271.             0, 0, (VOID *)0
  272.         }
  273.     },
  274.     {
  275.         INTUISUP_DATA_END
  276.     }
  277. };
  278.  
  279. struct    Library    *IntuiSupBase    =    NULL;
  280. struct    Window    *win            =    NULL;
  281. APTR    ri                        =    NULL;
  282. APTR    gl                        =    NULL;
  283.  
  284. UBYTE    suffix[32];
  285. UBYTE    chklst[128];
  286. UBYTE    ofname[128];
  287. UBYTE    dirnam[128];
  288.